﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebChat.Models
{
    public class PermittedUsersViewModel
    {
        public aspnet_User user { get; set; }

        public PermittedUsersViewModel() 
        {
            
        }

        public MultiSelectList permittedUsersList { get; set; }
        public int[] SelectedUsers { get; set; }

        public IEnumerable<SelectListItem> Items 
        {
            get
            {
                return new SelectList(Enumerable.Range(1, 300).OrderByDescending(user => user)
                .Select(user => new SelectListItem
                {
                    Value = user.ToString(),
                    Text = user.ToString()
                }
                ), "Value", "Text");
            }
        }

    }
}